package com.ungao.demo.service.impl;

import com.ungao.demo.bean.UserInfo;
import com.ungao.demo.mapper.UserMapper;
import com.ungao.demo.service.TestService;
import com.ungao.framework.annotation.Autowired;
import com.ungao.framework.annotation.Service;

import java.util.List;

@Service
public class TestServiceImpl implements TestService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public String hello(String name) {
        return "hello " + name;
    }

    @Override
    public List<UserInfo> selectList() {
        return this.userMapper.selectList();
    }

    @Override
    public UserInfo selectOne(int id) {
        return userMapper.selectOne(id);
    }

    @Override
    public int insert(String name, int age) {
        return userMapper.insert(name, age);
    }

    @Override
    public int update(int id, String name, int age) {
        return userMapper.update(id, name, age);
    }

    @Override
    public int delete(int id) {
        return userMapper.delete(id);
    }
}
